package com.jiamao.goplay.ui.discover.vm;

import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.jiamao.goplay.BuildConfig;
import com.jiamao.goplay.ui.discover.CityGoToFragment;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.base.MultiItemViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class CityItemTextVM extends MultiItemViewModel {

    //用户名的绑定
    public ObservableField<String> title = new ObservableField<>("");


    public CityItemTextVM(@NonNull BaseViewModel viewModel, String name ) {
        super(viewModel);
        title.set(name);

    }




    //条目的点击事件
    public BindingCommand itemClick = new BindingCommand(new BindingAction() {
        @Override
        public void call() {

            Bundle bd =new Bundle();
            bd.putString("name",title.get());
            viewModel.startContainerActivity(CityGoToFragment.class.getCanonicalName(),bd);




        }


    });

}
